home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archives
/
GNU
/
gawk_2_15_5.lha
/
gawk-2.15.5
/
io.ch
< prev
next >
Wrap
Text File
|
1995-01-20
|
2KB
|
105 lines
Changes for IO.C by Andreas Scherer, January 20, 1995.
@x l.26
#if !defined(VMS) && !defined(VMS_POSIX) && !defined(_MSC_VER)
#include <sys/param.h>
#endif
#include "awk.h"
@y
#include "ansiawk.h"
@z
@x l.49
#if defined(MSDOS) || defined(OS2) || defined(atarist)
#define PIPES_SIMULATED
#endif
@y
#if defined(MSDOS) || defined(OS2) || defined(atarist) || defined(_AMIGA)
#define PIPES_SIMULATED
#endif
#ifdef _AMIGA
extern int fileno(FILE *);
extern FILE *fdopen(int, const char *);
#define _NFILE 23
#endif
@z
@x l.69
static int pidopen P((IOBUF *iop, const char *name, const char *mode));
static int useropen P((IOBUF *iop, const char *name, const char *mode));
@y
@z
@x l.376
case Node_redirect_pipe:
if ((rp->fp = popen(str, "w")) == NULL)
fatal("can't open pipe (\"%s\") for output (%s)",
str, strerror(errno));
rp->flag |= RED_NOBUF;
break;
@y
@z
@x l.504
if ((rp->flag & (RED_PIPE|RED_WRITE)) == (RED_PIPE|RED_WRITE))
status = pclose(rp->fp);
else if (rp->fp)
@y
if (rp->fp)
@z
@x l.649
const char *cp, *ptr;
@y
const char *cp;
char *ptr;
@z
@x l.767
/* pidopen --- "open" /dev/pid, /dev/ppid, and /dev/pgrpid */
@y
#ifndef _AMIGA
/* pidopen --- "open" /dev/pid, /dev/ppid, and /dev/pgrpid */
@z
@x l.786
return 0;
}
@y
return 0;
}
#endif /* _AMIGA */
@z
@x l.789
/* useropen --- "open" /dev/user */
@y
#ifndef _AMIGA
/* useropen --- "open" /dev/user */
@z
@x l.838
return 0;
}
@y
return 0;
}
#endif /* _AMIGA */
@z
@x l.861
{ "/dev/pid", 8, pidopen },
{ "/dev/ppid", 9, pidopen },
{ "/dev/pgrpid", 11, pidopen },
{ "/dev/user", 9, useropen },
@y
@z
@x l.1056
if ((name = tempnam(".", "pip")) == NULL)
return NULL;
@y
if ((name = tmpnam("pip")) == NULL)
return NULL;
@z